#pragma once

#include <pkfuncs.h>
#include <psyscall.h>
#define PAGE_SIZE 4096
#include <kernel.h>

extern "C"
{
	HLOCAL RemoteHeapAlloc ( HANDLE, HANDLE, DWORD, DWORD );
}

extern "C"
{
	HLOCAL RemoteHeapAlloc ( HPROCESS, HANDLE, DWORD, DWORD );
	VOID   RemoteHeapFree  ( HPROCESS, HANDLE, HLOCAL );
	DWORD  GetEventData    ( HANDLE );
	BOOL   SetEventData    ( HANDLE, DWORD );
};


/* UNIFIED PATCHER */
DWORD ic_PatchProcImports ( HANDLE hProc, DWORD dFind, DWORD dReplace );

DWORD ReplaceProc (DWORD dFind, DWORD dReplace );

HANDLE GetProcessByName(TCHAR* name);